package org.springcloud.wisdom.springcloud_03_freshman.admin.controller;

import org.springcloud.wisdom.springcloud_03_freshman.admin.service.AdminPaidService;
import org.springcloud.wisdom.springcloud_03_freshman.common.bean.ResponseData;
import org.springcloud.wisdom.springcloud_03_freshman.common.controller.BaseController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@CrossOrigin
@RequestMapping("/pay")
public class AdminPayController extends BaseController {
    @Autowired
    AdminPaidService adminPaidService;

    @GetMapping("/all")
    public ResponseData<Object> paidPage(
            @RequestParam("pageNum") int pageNum,
            @RequestParam("pageSize")int pageSize,
            @RequestParam(value = "status",required = false)String status,
            @RequestParam(value = "sdept",required = false)Integer sdept
    ){
        return returnObject(adminPaidService.getPaidPage(pageNum, pageSize, status, sdept));
    }
}
